package zhupf.test.designPattern.builder.improve;

/**
 *  建造者模式之 指挥者  指挥建造流程
 */
public class HouseDirector {

    private HouseBuilder houseBuilder;

    public void setHouseBuilder(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public House constructHouse(){
        houseBuilder.buildBasic();
//        houseBuilder.buildWalls();
        houseBuilder.roofed();
        House build = houseBuilder.build();
        return build;
    }

}
